<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断属性及销毁对象</title>
</head>
<body>
    <script>
        var obj = {a:1, b:2, c:3, d:4, e:5};

        //判断对象中是否包含某个属性：in 操作符
        var a = 'b' in obj;    //true
        var b = 'g' in obj;    //false
        console.log(a);
        console.log(b);

        //销毁对象：对象 = null;
        obj = null;
        console.log(obj);
    </script>
</body>
</html>